package com.nuoniu.sibanyun.service.expenses;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nuoniu.sibanyun.entity.expenses.ExpensesBusinessOrder;
import com.nuoniu.sibanyun.entity.expenses.ExpensesProperty;
import com.nuoniu.sibanyun.entity.expenses.dto.ChangeRenewalTypeDto;
import com.nuoniu.sibanyun.entity.expenses.dto.ExpensesPropertySearchDto;
import com.nuoniu.sibanyun.entity.expenses.dto.RenewalDto;
import com.nuoniu.sibanyun.userThread.UserInfo;

import java.util.List;

/**
 * <p>
 * 费用中心-续费管理 服务类
 * </p>
 *
 * @author 小啊刚
 * @since 2022-05-09
 */
public interface IExpensesPropertyService extends IService<ExpensesProperty> {

    /**
     * 新购（产品）资源
     * @param expensesProperty
     */
    void addExpensesProperty(ExpensesProperty expensesProperty);

    /**
     * 校验 资源是否存在
     * @param expensesProperty
     * @return
     */
    ExpensesProperty checkExpensesProperty(ExpensesProperty expensesProperty);

    /**
     * 通过资源ID 查询资源信息
     * @param propertyUuid
     * @return
     */
    ExpensesProperty getByUUid(String propertyUuid);

    /**
     * 分页查询 续费（资源）管理
     * @param propertySearchDto
     * @return
     */
    Page<ExpensesProperty> pageList(ExpensesPropertySearchDto propertySearchDto);

    /**
     * 更改续费方式
     * @param changeRenewalTypeDto
     */
    void changeRenewalType(ChangeRenewalTypeDto changeRenewalTypeDto);

    /**
     * 批量续费
     * @param renewalDtos
     */
    void batchRenewal(List<RenewalDto> renewalDtos,List<ExpensesProperty> propertyList);


    /**
     * 批量续费(租户)
     * @param renewalDtos
     */
    void batchRenewalByCompany(List<RenewalDto> renewalDtos);

    /**
     *  自动续费
     */
    void autoRenewal();

    /**
     *  过期校验
     */
    void checkDeadline();

    /**
     * 批量关闭 资源关联服务
     * @param closeExpensesPropertyList
     * @return
     */
    void batchCloseService(List<ExpensesProperty> closeExpensesPropertyList);

    /**
     * 批量开启 资源关联服务
     * @param openExpensesPropertyList
     * @return
     */
    void batchOpenService(List<ExpensesProperty> openExpensesPropertyList);


    /**
     * 处理业务订单
     * @param businessOrder
     */
    void changeFromBusinessOrder(ExpensesBusinessOrder businessOrder);



}
